/*
 * SwingString.cpp  0.4.0 / Nov 17, 2010
 *
 * Copyright (c) 2010 - 2011, cute4j.com and contributors.
 *
 * This software is licensed under the LGPL version 2.1 license.
 * A copy of this license is included in the file LICENSE-LGPL.txt.
 */
#include "SwingString.h"

// SwingString :: Public Static Member Function. -------------------------------

/*!
 * \brief Creates new Java string using specified QString.
 *
 * \param str the QString reference
 *
 * \return Java string
 *
 * \exception OutOfMemoryError java error
 */
jstring SwingString::toJString(const QString &str)
{
  return JNISwingWrapper::newString(
                reinterpret_cast<const jchar *>(str.constData()), str.length());
}
